package jsave.action;

import java.io.File;

import jsave.exception.JSaveArretSauvegarde;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

public class ActionMAJDestination extends Action {

	private static final Logger log = Logger.getLogger(ActionMAJDestination.class);
	
	public ActionMAJDestination(int typeAction) {
		
		super();
		
		if (typeAction == Action.ACTION_C || typeAction == Action.ACTION_D) {
			this.typeAction = typeAction;
		} else {
			log.log(Level.ERROR, "ERREUR - Le type d'action '"+typeAction+"' ne correspond pas a l'action 'ActionMAJDestination' ");
		}
	}
	
	
	public void executer(File s, File d) throws JSaveArretSauvegarde {
		
		log.info("MD - "+d.getPath());
		MAJFichier(s,d);
	}
	
	public String getNom() {
		return "MAJ DESTINATION";
	}
}
